package com.qxsx.midi.db;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

/**
 * Created by Administrator on 2016/1/19.
 */
public class MyMusicOpenHelper extends SQLiteOpenHelper {
    public static final String TABLE_NAME = "music";
    public static final String DB_NAME = "music.db";
    public static final String COLUMN_ID = "_id";
    public static final String COLUMN_MUSIC_MAJOR = "_major";
    public static final String COLUMN_MUSIC_GRADE = "_grade";
    public static final String COLUMN_MUSIC_NAME = "_name";
    public static final String COLUMN_MUSIC_CONTENT = "_content";
    public static final String COLUMN_MUSIC_IMAGE = "_image";
    public static final String COLUMN_MUSIC_MUSIC = "_music";


    public static final String CREATE_TABLE_MUSIC = "CREATE TABLE " + TABLE_NAME
            + "(" + COLUMN_ID + " integer primary key autoincrement,"
            + COLUMN_MUSIC_MAJOR + " text,"
            + COLUMN_MUSIC_GRADE + " text,"
            + COLUMN_MUSIC_NAME + " text,"
            + COLUMN_MUSIC_CONTENT + " text,"
            + COLUMN_MUSIC_IMAGE + " text,"
            + COLUMN_MUSIC_MUSIC + " text)";

    public MyMusicOpenHelper(Context context) {
        super(context, DB_NAME, null, 1);
    }

    public void onCreate(SQLiteDatabase db) {
        db.execSQL(CREATE_TABLE_MUSIC);
    }

    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {

    }

}
